\newproblem{lay:2_5_Practice}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 2.5.Practice}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
  Find an LU factorization of the matrix $A=\begin{pmatrix}2 & -4 & -2 & 3\\ 6 &-9 &-5 &8\\ 2 &-7 &-3 &9\\ 4 &-2 &-2 &-1\\ -6 &3 &3 &4\end{pmatrix}$
}{
  % Solution
	We apply row operations on $A$ to reduce it to an upper triangular matrix and annotate the different matrices that we needed\\
	\begin{center}
		\begin{tabular}{rcc}
			$A=\begin{pmatrix}2 & -4 & -2 & 3\\ 6 &-9 &-5 &8\\ 2 &-7 &-3 &9\\ 4 &-2 &-2 &-1\\ -6 &3 &3 &4\end{pmatrix}$ &
			$\mathbf{r}_2 \leftarrow \mathbf{r}_2 -3\mathbf{r}_1$ &
			$E_1=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ -3 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$E_1A=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 2 &-7 &-3 &9\\ 4 &-2 &-2 &-1\\ -6 &3 &3 &4\end{pmatrix}$ &
			$\mathbf{r}_3 \leftarrow \mathbf{r}_3 - \mathbf{r}_1$ &
			$E_2=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ -1 & 0& 1 &0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$E_2E_1A=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &-3 &-1 &6\\ 4 &-2 &-2 &-1\\ -6 &3 &3 &4\end{pmatrix}$ &
			$\mathbf{r}_4 \leftarrow \mathbf{r}_4 - 2\mathbf{r}_1$ &
			$E_3=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ -2 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$E_3E_2E_1A=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &-3 &-1 &6\\ 0 &6 &2 &-7\\ -6 &3 &3 &4\end{pmatrix}$ &
			$\mathbf{r}_5 \leftarrow \mathbf{r}_5 +3\mathbf{r}_1$ &
			$E_4=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 3 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$\begin{array}{r}E_4\\E_3E_2E_1A\end{array}=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &-3 &-1 &6\\ 0 &6 &2 &-7\\ 0 &-9 &-3 &13\end{pmatrix}$ &
			$\mathbf{r}_3 \leftarrow \mathbf{r}_3 +\mathbf{r}_2$ &
			$E_5=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 1& 1 &0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$\begin{array}{r}E_5E_4\\E_3E_2E_1A\end{array}=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &0 &0 &5\\ 0 &6 &2 &-7\\ 0 &-9 &-3 &13\end{pmatrix}$ &
			$\mathbf{r}_4 \leftarrow \mathbf{r}_4-2\mathbf{r}_2$ &
			$E_6=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ 0 & -2 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$\begin{array}{r}E_6E_5E_4\\E_3E_2E_1A\end{array}=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &0 &0 &5\\ 0 &0 &0 &-5\\ 0 &-9 &-3 &13\end{pmatrix}$ &
			$\mathbf{r}_5 \leftarrow \mathbf{r}_5+3\mathbf{r}_2$ &
			$E_7=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 3 & 0 & 0 & 1\end{pmatrix}$ \\

			$\begin{array}{r}E_7\\E_6E_5E_4\\E_3E_2E_1A\end{array}=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &0 &0 &5\\ 0 &0 &0 &-5\\ 0 &0 &0 &10\end{pmatrix}$ &
			$\mathbf{r}_4 \leftarrow \mathbf{r}_4+\mathbf{r}_3$ &
			$E_8=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1\end{pmatrix}$ \\

			$\begin{array}{r}E_8E_7\\E_6E_5E_4\\E_3E_2E_1A\end{array}=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &0 &0 &5\\ 0 &0 &0 &0\\ 0 &0 &0 &10\end{pmatrix}$ &
			$\mathbf{r}_5 \leftarrow \mathbf{r}_5-2\mathbf{r}_3$ &
			$E_9=\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0& 1 &0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & -2 & 0  & 1\end{pmatrix}$ \\

			$\begin{array}{r}E_9E_8E_7\\E_6E_5E_4\\E_3E_2E_1A\end{array}=\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &0 &0 &5\\ 0 &0 &0 &0\\ 0 &0 &0 &0\end{pmatrix}$ &
			& \\
		\end{tabular}
	\end{center}
	This latter matrix is $U$ and $L$ is
	\begin{center}
		$\begin{array}{rcl}L&=&(E_9E_8E_7E_6E_5E_4E_3E_2E_1)^{-1}=\\
		     &=&\begin{pmatrix}1 & 0 & 0 & 0 & 0\\ -3 &1 &0 &0 & 0\\-4 &1 &1 &0 & 0\\ 0 &-1 &1 &1 & 0\\ 2 &1 &-2 &0 &1\end{pmatrix}^{-1}
		     =\begin{pmatrix}1 & 0 & 0 & 0 & 0\\  3 &1 &0 &0 & 0\\ 1 &-1 &1 &0 & 0\\ 2 & 2 &-1 &1 & 0\\ -3 &-3 & 2 &0 &1\end{pmatrix}
		\end{array}$
	\end{center}
	Finally, we have
	\begin{center}
		$A=LU\Rightarrow \begin{pmatrix}2 & -4 & -2 & 3\\ 6 &-9 &-5 &8\\ 2 &-7 &-3 &9\\ 4 &-2 &-2 &-1\\ -6 &3 &3 &4\end{pmatrix}=
		    \begin{pmatrix}1 & 0 & 0 & 0 & 0\\  3 &1 &0 &0 & 0\\ 1 &-1 &1 &0 & 0\\ 2 & 2 &-1 &1 & 0\\ -3 &-3 & 2 &0 &1\end{pmatrix}
				\begin{pmatrix}2 & -4 & -2 & 3\\ 0 &3 &1 &-1\\ 0 &0 &0 &5\\ 0 &0 &0 &0\\ 0 &0 &0 &0\end{pmatrix}$
	\end{center}
}
\useproblem{lay:2_5_Practice}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
